package banding.com.google.Zxing.scanview;

import android.content.Context;
import android.widget.Toast;

import banding.com.google.Zxing.utils.FlashlambUtil;

/**
 * @author Yue
 * @date 2017/8/3 18:15
 */
public class FlashlambMgr {

    static void clickView(Context context,boolean isChecked) {
        if (FlashlambUtil.checkFlashlight(context)) {
            if (isChecked) {
                FlashlambUtil.openFlashlight();
            } else {
                FlashlambUtil.closeFlashlight();
            }
        } else {
            Toast.makeText(context, "没有找到闪光灯", Toast.LENGTH_SHORT);
        }
    }
}
